﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="out_daily.aspx.cs" Inherits="out_daily" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <%--    <script type="text/javascript">
          $(function () {

              var onSampleResized = function (e) {
                  var columns = $(e.currentTarget).find("th");
                  var msg = "columns widths: ";
                  columns.each(function () { msg += $(this).width() + "px; "; })
                  $("#sample2Txt").html(msg);

              };

              $("#ContentPlaceHolder1_grvData").colResizable({
                  liveDrag: true,
                  gripInnerHtml: "<div class='grip'></div>",
                  draggingClass: "dragging",
                  onResize: onSampleResized
              });
              $("#ContentPlaceHolder1_grvData").resizable();

          });	
      </script>--%>
      <script type="text/javascript">
             function pageLoad() {


                  $(document).ready(function () {


                      $("#ContentPlaceHolder1_grvData").tablesorter();

                  });


              }
      </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:UpdatePanel ID="UpdateTable" runat="server">
<ContentTemplate> 
 <div class="main">

<div class="filter">
    <table>
        <tr>
            <td >
                Department:&nbsp;&nbsp;&nbsp;
            </td>
            <td>
                <asp:DropDownList ID="ddlDepartment" runat="server" Width="158px" 
                    AutoPostBack="True" DataTextField="DeptName" DataValueField="DeptCode" 
                    onselectedindexchanged="ddlDepartment_SelectedIndexChanged" CssClass="txt">
                </asp:DropDownList>
            </td>
            <td >
               &nbsp;
               Attn Date</td>
             <td>
                 &nbsp;from:
                  </td>
           
             <td>
                 <asp:TextBox ID="txtAttnDateFrom" runat="server" Width="150px" CssClass="txt"></asp:TextBox>  
                <asp:CalendarExtender ID="txtAttnDateFrom_CalendarExtender" runat="server" 
                    Enabled="True" TargetControlID="txtAttnDateFrom" CssClass="orange">
                </asp:CalendarExtender>
                  </td>
           
             <td>
                 &nbsp; to:&nbsp; </td>
           
             <td >
           
               <asp:TextBox ID="txtAttnDateTo" runat="server" Width="150px" CssClass="txt"></asp:TextBox>
                
                <asp:CalendarExtender ID="txtAttnDateTo_CalendarExtender" runat="server" 
                    Enabled="True" TargetControlID="txtAttnDateTo" CssClass="orange">
                </asp:CalendarExtender>
                
              
            &nbsp;</td>
           
        </tr>
       <tr>
            <td >
               Section:
            </td>
            <td >
                <asp:DropDownList ID="ddlSection" runat="server" DataTextField="SectionName" 
                    DataValueField="SectionCode" Width="158px" CssClass="txt">
                </asp:DropDownList>
            </td>
            <td>
                &nbsp;
                Emp Code:</td>
             <td>
                &nbsp;</td>
           
             <td>
                 <asp:TextBox ID="txtEmpCode" runat="server" Width="150px" CssClass="txt"></asp:TextBox>
                 </td>
           
             <td  colspan="2">
                  <asp:CheckBox ID="chkIn" runat="server" Checked="True" 
                      Text=" (All) Time - In" Enabled="False" Visible="False" />
                <asp:CheckBox ID="chkOut" runat="server" Checked="True" Text="(All) Time - Out" 
                      Enabled="False" Visible="False" />
                
             <asp:CheckBox ID="chkAll" runat="server" Checked="true" Text=" (All)" 
                    Enabled="False" Visible="False"/>
           <asp:CheckBox ID="chkLateIn" runat="server" Text=" (All) Late-In" Checked="true" 
                    Enabled="False" Visible="False"/>
           
               <asp:CheckBox ID="chkEarlyOut" runat="server" Text="(All) Early-Out" 
                    Checked="true" Enabled="False" Visible="False" />
                 </td>
           
        </tr>
        </table>
    <div class="submit border_top">
    <input id="btnClear" type="submit" value="Clear" class="btngray"/>
    <asp:Button ID="btnFilter" runat="server" Text="Filter" CssClass="btnOrage" 
        onclick="btnFilter_Click"/>
</div>
</div>

<div class="list">
<table>
    <tr>
        <td>
            View
        </td>
        <td>
            <asp:TextBox ID="txtPageNumber" runat="server" CssClass="txtPage" Width="30px" OnTextChanged="txtPageNumber_TextChanged" onkeypress="return ValidateKeypress(/\d/,event);" MaxLength="3"  Text="20"></asp:TextBox> 
        </td>
        <td>
            rows per page
        </td>
    </tr>
</table>

 <div class="scroll_ngang">
       <div class="gridview" style="width:1300px;" id="sample2">
               <asp:GridView ID="grvData" runat="server" AutoGenerateColumns="False" 
              
                   onpageindexchanging="grvData_PageIndexChanging" PageSize="20" 
                   ShowHeaderWhenEmpty="True" onrowdatabound="grvData_RowDataBound" 
                   EmptyDataText="No data"  >
                   <Columns>
                       <asp:BoundField DataField="EmpCode" HeaderText="Emp Code" FooterText="Total :" >
                        <ItemStyle Width="70px" />
                       </asp:BoundField>
                     
                       <asp:BoundField DataField="EmpName" HeaderText=" Emp Name " >
                       
                       <ItemStyle Width="130px" />
                       </asp:BoundField>
                       <asp:BoundField DataField="DeptName" HeaderText=" Dept Name " >
                       <ItemStyle Width="80px" />
                       </asp:BoundField>
                       
                      <%-- <asp:BoundField DataField="SectionName" HeaderText=" Section Name "  >
                      <ItemStyle Width="150px" />
                       </asp:BoundField>--%>
                       <asp:BoundField DataField="AttnDate" HeaderText=" Attn Date " DataFormatString="{0:dd/MM/yyyy}">
                       <ItemStyle Width="80px" />     
                       </asp:BoundField>
                       <asp:BoundField DataField="WeekItem" HeaderText="Day of"  >
                      
                       </asp:BoundField>
                     <%--  <asp:BoundField DataField="ShiftCode" HeaderText=" Shift Code " >
                       
                       </asp:BoundField>--%>
                       <asp:BoundField DataField="Begin" HeaderText=" Begin " >
                     
                       </asp:BoundField>
                       <asp:BoundField DataField="End" HeaderText=" End " >
                    
                       </asp:BoundField>
                       <asp:BoundField DataField="InMachine" HeaderText=" Time In " DataFormatString="{0:HH:ss}">
                  
                       </asp:BoundField>
                       <asp:BoundField DataField="OutMachine" HeaderText=" Time Out "  DataFormatString="{0:HH:ss}">
                
                       </asp:BoundField>
                        <asp:BoundField DataField="LateIn" HeaderText=" Late In " >
      
                       </asp:BoundField>
                       <%-- <asp:BoundField DataField="MinuteLateIn" HeaderText=" Munite " >
                 
                       </asp:BoundField>--%>
                        <asp:TemplateField HeaderText="Munite">
                            <ItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%# Eval("MinuteLateIn").ToString().ToLower() == "0"? " ":Eval("MinuteLateIn")%>'></asp:Label>
                                   
                                </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="EarlyOut" HeaderText=" Early Out " >
                 
                       </asp:BoundField>
                        <%--<asp:BoundField DataField="MinuteEarlyOut" HeaderText=" Munite " >
                 
                       </asp:BoundField>--%>
                        <asp:TemplateField HeaderText="Munite">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("MinuteEarlyOut").ToString().ToLower() == "0"? " ":Eval("MinuteEarlyOut")%>'></asp:Label>
                                   
                                </ItemTemplate>
                        </asp:TemplateField>
                      <%--  <asp:BoundField DataField="TotalHour" HeaderText=" Total Hour " >
                     
                       </asp:BoundField>--%>
                       <asp:TemplateField HeaderText="Total Hour">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("TotalHour").ToString().ToLower() == "0.00"? " ":Eval("TotalHour")%>'></asp:Label>
                                   
                                </ItemTemplate>
                        </asp:TemplateField>
                        <%--<asp:BoundField DataField="WorKingDayTotal" HeaderText=" Total WK Day " >
                 
                       </asp:BoundField>--%>
                       <asp:TemplateField HeaderText="Total Hour">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("TotalHour").ToString().ToLower() == "0.00"? " ":Eval("TotalHour")%>'></asp:Label>
                                   
                                </ItemTemplate>
                        </asp:TemplateField>
                        <%--<asp:BoundField DataField="WorKingDay" HeaderText=" WKDay Standard " >
                  
                       </asp:BoundField>--%>
                       <asp:TemplateField HeaderText="WKDay Standard">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("WorKingDay").ToString().ToLower() == "0.00"? " ":Eval("WorKingDay")%>'></asp:Label>
                                   
                                </ItemTemplate>
                        </asp:TemplateField>
                      <%-- <asp:BoundField DataField="HourHC" HeaderText=" Main Hour " >
                   
                       </asp:BoundField>--%>
                       <asp:TemplateField HeaderText="Main Hour">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("HourHC").ToString().ToLower() == "0.00"? " ":Eval("HourHC")%>'></asp:Label>
                                   
                                </ItemTemplate>
                        </asp:TemplateField>
                       <%--  <asp:BoundField DataField="OTHour" HeaderText=" OTHour " >
                      
                       </asp:BoundField>--%>
                       <asp:TemplateField HeaderText="OTHour">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("OTHour").ToString().ToLower() == "0.00"? " ":Eval("OTHour")%>'></asp:Label>
                                   
                                </ItemTemplate>
                        </asp:TemplateField>
                         <%--<asp:BoundField DataField="LVHour" HeaderText=" Leave Hour " >
                    
                       </asp:BoundField>--%>
                       <asp:TemplateField HeaderText=" Leave Hour">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("LVHour").ToString().ToLower() == "0.00"? " ":Eval("LVHour")%>'></asp:Label>
                                   
                                </ItemTemplate>
                        </asp:TemplateField>
                   </Columns>

                   <PagerSettings Visible="False" />

                   <SelectedRowStyle BackColor="#99FFCC" />

               </asp:GridView>
               
           </div><!-- body -->
   </div><!-- ngang -->
   <div style="width:100%;text-align:right;color:#008082;font-weight:bold;font-size:1.2em;">
    <asp:Label ID="lbTotal" runat="server" Text=""></asp:Label>
   </div>
   <div class="foot_table clear">
            <table>
                    <tr>
                        <td>
                            <asp:ImageButton ID="ImageButton1" runat="server" 
                                ImageUrl="~/resources/images/active-pre.png" onclick="ImageButton1_Click" />
                        </td>
                        <td>
                            Page:&nbsp; 
                        </td>
                        <td>
                            
                            <asp:DataList ID="dlPaging" runat="server" RepeatDirection="Horizontal" OnItemCommand="dlPaging_ItemCommand"
                                OnItemDataBound="dlPaging_ItemDataBound">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lnkbtnPaging" runat="server" CommandArgument='<%# Eval("PageIndex") %>'
                                        CommandName="Paging" Text='<%# Eval("PageText") %>'></asp:LinkButton>&nbsp;
                                </ItemTemplate>
                            </asp:DataList>
                        </td>
                        <td>
                            <asp:ImageButton ID="Image1" runat="server" 
                                ImageUrl="~/resources/images/active-next.png" onclick="Image1_Click" />
                        </td>
                    </tr>
                </table>
   </div><!-- footer table -->
</div><!-- list -->

</div>
 </ContentTemplate>
</asp:UpdatePanel> 
<div style="height:1px">

        <asp:UpdateProgress ID="UpadateProc" runat="server">
        <ProgressTemplate>
                <div class="loading">

                    <img src="resources/images/process_small2.gif" alt=""/>
            </div>
    </ProgressTemplate>
</asp:UpdateProgress>
</div>
</asp:Content>

